package com.ycfmedical.bed.ui.fragment;

import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import com.jude.rollviewpager.RollPagerView;
import com.jude.rollviewpager.hintview.ColorPointHintView;
import com.ycfmedical.bed.Constants;
import com.ycfmedical.bed.ControlConstants;
import com.ycfmedical.bed.R;
import com.ycfmedical.bed.adapter.ControlImagePlay;
import com.ycfmedical.bed.present.ControlPresenter;

import butterknife.BindView;
import butterknife.OnClick;
import butterknife.Unbinder;
import cn.droidlover.xdroidmvp.mvp.XFragment;
import cn.droidlover.xdroidmvp.mvp.XLazyFragment;

/**
 * Created by Administrator on 2017-03-22.
 * 体位控制_一键体位
 */

public class ControlQuicklyFragment extends XLazyFragment<ControlPresenter> {
    @BindView(R.id.quickly_sleep)
    Button quicklySleep;
    @BindView(R.id.quickly_relaxation)
    Button quicklyRelaxation;
    @BindView(R.id.quickly_repast)
    Button quicklyRepast;
    @BindView(R.id.quickly_crp)
    Button quicklyCrp;

    Unbinder unbinder;

    public int getType()
    {
        return ControlConstants.CONTROL_QUICKLY;
    }
    @Override
    public void initData(Bundle savedInstanceState) {

    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_control_quickly;
    }
    @Override
    public void onStart() {
        super.onStart();
    }

    @Override
    public ControlPresenter newP() {
        return new ControlPresenter();
    }

    public static ControlQuicklyFragment newInstance(){

        return new ControlQuicklyFragment();
    }


    @OnClick({R.id.quickly_sleep, R.id.quickly_relaxation, R.id.quickly_repast, R.id.quickly_crp})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.quickly_sleep:
                getP().QuicklyPost(1);
                break;
            case R.id.quickly_relaxation:
                getP().QuicklyPost(2);
                break;
            case R.id.quickly_repast:
                getP().QuicklyPost(3);
                break;
            case R.id.quickly_crp:
                getP().QuicklyPost(4);
                break;
        }
    }
}
